package com.cy.aircompressor.main.ui.systemsetting.provider;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.NonNull;

import com.cy.aircompressor.databinding.ItemPowerManagerLayoutBinding;
import com.cy.aircompressor.databinding.ItemUserManagerLayoutBinding;
import com.cy.aircompressor.entity.power.PowerStation;
import com.cy.aircompressor.entity.system.UserInfo;
import com.drug.lib.view.recycptr.ItemViewBinder;
import com.net.model.base.BaseBindViewHolder;

public class PowerManagerProvider extends ItemViewBinder<PowerStation, PowerManagerProvider.ViewHolder> {
    Context mContext;

    public PowerManagerProvider(Context mContext) {
        this.mContext = mContext;
    }

    @NonNull
    @Override
    protected PowerManagerProvider.ViewHolder onCreateViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent) {
        return new ViewHolder(ItemPowerManagerLayoutBinding.inflate(inflater, parent, false));

    }

    @Override
    protected void onBindViewHolder(@NonNull PowerManagerProvider.ViewHolder holder, @NonNull PowerStation entity) {
        holder.mBinding.serial.setText(String.valueOf(holder.getAdapterPosition()));
        holder.mBinding.powerStationName.setText(entity.getName());
        holder.mBinding.remake.setText(entity.getRemark());
    }


    public class ViewHolder extends BaseBindViewHolder<ItemPowerManagerLayoutBinding> {

        protected ViewHolder(ItemPowerManagerLayoutBinding itemView) {
            super(itemView);
        }
    }


}
